//
//  Person.m
//  05-循环遍历
//
//  Created by dllo on 16/7/8.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "Person.h"

@implementation Person
- (instancetype)initWithName:(NSString *)name age:(NSInteger)age {
    self = [super init];
    if (self) {
        _name = name;
        _age = age;
    }
    return self;
}
+ (instancetype)personWithName:(NSString *)name age:(NSInteger)age {
    return [[Person alloc]initWithName:name age:age];
}
- (NSString *)description {
    return [NSString stringWithFormat:@"%@  %ld",self.name,self.age];
}
@end
